value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~create}
-
-{\bf Overview:}
-Create a new host instance, and return its handle.
-
- \noindent {\bf Signature:}
-\begin{verbatim} (host ref) create (session_id s, host record args)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host record } & args & All constructor arguments \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-host ref
-}
-
-
-reference to the newly created object
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~destroy}
-
-{\bf Overview:}
-Destroy the specified host instance.
-
- \noindent {\bf Signature:}
-\begin{verbatim} void destroy (session_id s, host ref self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & reference to the object \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
/*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
xen_host_get_by_uuid(xen_session *session, xen_host *result, char *uuid);
-/**
- * Create a new host instance, and return its handle.
- */
-extern bool
-xen_host_create(xen_session *session, xen_host *result, xen_host_record *record);
-
-
-/**
- * Destroy the specified host instance.
- */
-extern bool
-xen_host_destroy(xen_session *session, xen_host host);
-
-
/**
* Get all the host instances with the given label.
*/
/*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
}
-bool
-xen_host_create(xen_session *session, xen_host *result, xen_host_record *record)
-{
- abstract_value param_values[] =
- {
- { .type = &xen_host_record_abstract_type_,
- .u.struct_val = record }
- };
-
- abstract_type result_type = abstract_type_string;
-
- *result = NULL;
- XEN_CALL_("host.create");
- return session->ok;
-}
-
-
-bool
-xen_host_destroy(xen_session *session, xen_host host)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = host }
- };
-
- xen_call_(session, "host.destroy", param_values, 1, NULL, NULL);
- return session->ok;
-}
-
-
bool
xen_host_get_by_name_label(xen_session *session, struct xen_host_set **result, char *label)
{
return xen_api_success(XendNode.instance().host_metrics_uuid)
# object methods
- def host_destroy(self, session, host_ref):
- return xen_api_error(XEND_ERROR_UNSUPPORTED)
def host_disable(self, session, host_ref):
XendDomain.instance().set_allow_new_domains(False)
return xen_api_success_void()
# class methods
def host_get_all(self, session):
return xen_api_success((XendNode.instance().uuid,))
- def host_create(self, session, struct):
- return xen_api_error(XEND_ERROR_UNSUPPORTED)
def host_get_by_name_label(self, session, name):
if XendNode.instance().name == name:
return xen_api_success((XendNode.instance().uuid,))